Skip to content

chore: Update valid permissions for organization repository role#3444

Open
w1mvy wants to merge 1 commit into
integrations:mainfrom
w1mvy:update-organization-repository-role-permissions
Open

chore: Update valid permissions for organization repository role#3444
w1mvy wants to merge 1 commit into
integrations:mainfrom
w1mvy:update-organization-repository-role-permissions

Conversation

@w1mvy
Copy link
Copy Markdown

@w1mvy w1mvy commented May 25, 2026

Before the change?

  • validRolePermissions in github/resource_github_organization_repository_role.go was a snapshot of the GitHub repository fine-grained permissions API and had drifted from the upstream response. It rejected newer permissions (read_copilot_agent_settings, write_copilot_agent_settings, write_repository_agent_secrets, write_repository_agent_variables) at plan time via CustomizeDiff, even though the GitHub API would accept them.
  • The doc-link comment above the slice referenced apiVersion=2022-11-28, which is no longer the current version on the linked GitHub docs page.

After the change?

  • The four permissions above are added to validRolePermissions (kept alphabetically sorted) so configurations using them now pass validation.
  • The doc-link comment is bumped to apiVersion=2026-03-10 to match the current GitHub docs page for GET /orgs/{org}/repository-fine-grained-permissions.
  • The list was generated by calling GET /orgs/{org}/repository-fine-grained-permissions against a real org and diffing the returned names against the existing slice; only additions were observed (no permissions removed upstream).

Pull request checklist

  • Schema migrations have been created if needed (example)
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)

Notes:

  • make generatedocs produced no diff (the generated docs do not enumerate individual permissions).
  • make fmt, make lint, and make test all pass locally.

Does this introduce a breaking change?

  • Yes
  • No

@github-actions
Copy link
Copy Markdown

👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

@w1mvy w1mvy marked this pull request as ready for review May 25, 2026 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant